Recent digital multi-function peripherals (MFP) include a function that files image data in a hard disk, an image transmission function such as Scan-to-Email, etc. In such devices, a compression process is performed for image data when saving or transmitting the image data and a JPEG compression mode is widely used for the mode thereof.
In a standard JPEG compression mode, some parameters such as a quantization table and a subsampling can be set. These parameters are responsible for trade-off between image quality and a compression rate of a compressed image and adjustment can be performed in accordance with purpose and preference, such as setting that focuses on image quality, compression rate, or averagely maintaining both, for example. In view of the above situations, it is desirable to further set optimum parameters in accordance with a type of image such as setting appropriate for a text image, setting appropriate for a halftone dot image, or setting appropriate for mixed image including both.
However, in general, compression parameters are often uniformly set regardless of types of target images, and the applied parameters often are fixed values preliminarily stored in devices or values arbitrarily and manually specified by users.
The following technologies are disclosed as techniques of discriminating a type of image to selectively switch and apply compression parameters.
Japanese Laid-Open Patent Publication No. 2002-247373 describes an example of determining a type of image for every eight lines to select a quantization table depending on the result thereof. Specifically, an image area is determined for every eight lines in a target image to select one of a plurality of preliminarily prepared quantization tables depending on the determination result (text or picture), and the quantization table is used to perform JPEG encoding for the eight-line image data. The encoded data are transmitted in a format that adds image area determination information (i.e., encoded table information) to the encoded data for each line. When receiving the encoded data in this format, the image area determination information included in the encoded data is detected and the quantization table same as that used for encoding is selected and decoded to restore the data to eight-line decompressed image data.
Japanese Laid-Open Patent Publication No. 2000-350037 describes an example of recognizing a type of image for every 8×8 pixels (for each block of DCT process) to select a quantization table depending on the result thereof. Specifically, if the number of gray levels of image data of an 8×8-pixel block is two to an arbitrary number, the block is recognized as a text/simple image, and if the block is recognized as the text/simple image, the quantization table is changed so as not to delete a high-frequency component to perform the JPEG encoding. In this case, the compressed data are data in a format that adds a recognition flag of each block to the JPEG encoded data. When restoring the compressed data, the added recognition flags are referenced to change and decode the quantization table as is the case with the encoding.
The above techniques are problematic in that the format of the compressed data is not compliant with the standard JPEG file format. In either technique, the compressed data have a unique format that having image type recognition information added in addition to the encoded data of the image. If such a unique format is used, the image data cannot be restored unless the format is supported and can be handled on the data decoding side (receiving side). That is, since the unique data formats cannot be decoded with a standard JPEG decompressing algorithm (such as circuit and program), the decoding side must have a dedicated decompressing circuit or program so that data in the unique formats can be decoded.
Since the recognition information is added for each block or each line in either technique, it is problematic that a data size after compression is correspondingly increased and that a compression rate cannot be improved. Only the switching of the quantization table is performed for the compression parameters, and the compression rate is not sufficiently improved in accordance with a type of image.
Since the compression algorithm is not compliant with the standard JPEG in either technique, a lack of versatility also is a problem. That is, since a mechanism not included in the standard JPEG compression algorithm is disposed which is a mechanism of switching the quantization table for each block or every eight lines and a mechanism of forming data in a unique format adding the recognition information and since an area (image area) identification signal is required for every eight lines or each 8×8 block, general-purpose JPEG compression circuit and program cannot be used, and special compression circuit and program must be designed and developed for each technique.